<template>
  <div id="app" class="custom-theme">
    <router-view v-if="isRouterAlive"/>
  </div>
</template>

<script>
export default{
  name: 'App',
    // https://blog.csdn.net/qq_16772725/article/details/80467492
    provide(){
      return{
          reload:this.reload
      }
    },
    data(){
      return{
          isRouterAlive:true
      }
    },
    methods:{
      reload(){
          this.isRouterAlive = false
          this.$nextTick(function(){
              this.isRouterAlive = true
          })
      }
    }
}
</script>
